import React from "react";
import './index.scss';
interface Props {
  title?: string,
  author?: string,
  description?: string,
  url?: string,
  urlToImage?: string,
  publishedAt?: string,

}

export default class News extends React.Component<Props> {
  render() {
    const { title, author, description, url, urlToImage, publishedAt } = this.props ;
    return (
      <div>
        <h3><a href={url}>{title}</a></h3>
        <p>From: {author}</p>
        <div className="artical">
          <img src={urlToImage} />
          <p>{description}</p>
        </div>
        <b>{publishedAt}</b>
        <hr />
      </div>
    )
  }
}